using System;
namespace NameSpace{
    class Commodity{
        
        
        public string id ;
        public string name;
        public string space;
        public int danjia;
        public double zhekou;
        public int number;
        public int total;
        public Commodity(string id,string name,string space ,int danjia){
            this.id = id;
            this.name = name;
            this.space = space;
            this.danjia = danjia;
        }
        public void setNumebr(int number){
            this.number = number;
            setZhekou();
        }
        public void setZhekou(){
            if(this.number<5){
                zhekou = 1;
            }else if(number>=5 && number<10){
                zhekou = 0.9;
            }else if(number>=10){
                zhekou = 0.8;
            }
        }
        public void  setTotal(){
            total = danjia*number*zhekou;
        }
    } 
    class program{
        
        public static void main(String[] args){
                
            string id ;
            string name;
            string space;
            int danjia;
            double zhekou;
            int number;
            int total;
            Console.writeLine("请输入产品的ID:")
            id = console.ReadLine();
            Console.writeLine("请输入产品的名字:")
            name = console.ReadLine();
            Console.writeLine("请输入产品的产地:")
            space = console.ReadLine();
            Console.writeLine("请输入产品的单价:")
            danjia = int.pares(console.ReadLine());
            Console.writeLine("请输入产品的数量:")
            number = int.pares(console.ReadLine());
            Commodity commodity = new Commodity (id,name,space,danjia);
            commodity.setNumber(number);
            commodity.setTotal();
            Console.writeLine("当前商品的所有信息如下所示");
            Console.writeLine("商品的编号为{0}",commodity.id);
            Console.writeLine("商品的名称为{0}",commodity.name);
            Console.writeLine("商品的产地为{0}",commodity.space);
            Console.writeLine("商品的单价为{0}",commodity.danjia);
            Console.writeLine("商品的订购数量为{0}",commodity.number);
            Console.writeLine("商品的总价为{0}",commodity.total);
        }
    }
}